package com.example.mushroom.service.impl;

import com.example.mushroom.entity.Log;
import com.example.mushroom.mapper.LogMapper;
import com.example.mushroom.service.LogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;

@Service
public class LogServiceImpl implements LogService {

    @Autowired
    private LogMapper logMapper;

    @Override
    public int insertLog(Log log) {
        return logMapper.insertLog(log);
    }

    @Override
    public Log selectLogById(Integer id) {
        return logMapper.selectLogById(id);
    }

    @Override
    public List<Log> selectAllLogs() {
        return logMapper.selectAllLogs();
    }

    @Override
    public int updateLog(Log log) {
        return logMapper.updateLog(log);
    }

    @Override
    public int deleteLogById(Integer id) {
        return logMapper.deleteLogById(id);
    }

    @Override
    public List<Log> selectLogsByPage(int offset, int limit) {
        return logMapper.selectLogsByPage(offset, limit);
    }
}